Skip to content

Jira #758, Add scan response support for central role, git 370 #412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

SidLeung
Copy link
Contributor

This code modification is to enable the processing of the Scan Response data when the BLE stack is operating in the Central mode.

@SidLeung
Copy link
Contributor Author

@bigdinotech @eriknyquist , please review the code change. @noelpaz @russmcinnis , this feature has gone through unit testing. Please perform verification testing.

@SidLeung
Copy link
Contributor Author

@russmcinnis @noelpaz , please check out the additional changes to the PR - the adv info of the Scan Respond data are returned to the user sketch.

@SidLeung
Copy link
Contributor Author

PR merging error corrected. Regenerated the JSON here,

http://mkfs.ndg.intel.com/precommit/json/package_0.0.197_index.json

@SidLeung
Copy link
Contributor Author

@russmcinnis @noelpaz , please re-test this PR. Some changes were not merged into the last PR. Thanks.

@SidLeung
Copy link
Contributor Author

SidLeung commented Mar 1, 2017

@russmcinnis , previous emerge had an error and is corrected. Please retry your testing. Thanks.

Feature added:
1. GIT#370 Add scan response support for central role
    Arduino request that the BLE library, in Peripheral mode,
    to support Scan Response Data request from a Central.
2. Arduino expects the reply similar to an Apple device.
    They have provide a policy for the construction of the
    Scan Response data message.
3. Jira 836 BLE Central scan does not enumerate peripherals that are
    non connectable.
    In Central mode, the BLE library should enumerate Peripheral
    that are non-connectable (eg beacon).

Code mods:

BLEDevice.cpp:
1. Add the call to get Manufacturer Data info from a Peripheral.
    Non-connectable device may only broadcast this info.

BLEDeviceManager.cpp:
1. Added setAdvertiseData() for the creation of the Scan Response Data message.
2. In advDataInit(), follows the policy (defined by Arduino) to add Adv data to
    the Scan Response Data message using setAdvertiseData().
3. Delete the filter about non-connectable advertisement.
4. Added APIs, hasManufacturerData(), setManufacturerData(),
    hasManufacturerData(), to gain access to adv info of
    non-connectable Peripherals.

BLEDeviceManager.h:
BLEDevice.h:
Prototyping.
@SidLeung
Copy link
Contributor Author

SidLeung commented Mar 3, 2017

Code approved, passed tested. Same code base is used for Jira 836, PR #459. Close this PR and merge #459 to main trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants